From: Keir Fraser Date: Wed, 16 Jul 2008 12:54:02 +0000 (+0100) Subject: x86: Adjust handle_hpet_broadcast to let it run better before broadcast exit X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14188^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=6091e4d412fa285814c70d772331b813d2167afd;p=xen.git x86: Adjust handle_hpet_broadcast to let it run better before broadcast exit Since hpet_broadcast_exit has been moved after interrupt enabled in C3 case, so adjust the handler of hpet broadcast to adapt to this. Meanwhile, remove a freqently executed debug print line to simplify the serial output. Signed-off-by: Wei Gang --- diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index 3e2e95423e..147705d2f0 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -95,13 +95,8 @@ static int reprogram_hpet_evt_channel( } delta = expire - now; - if ( delta <= 0 ) - { - printk(KERN_DEBUG "reprogram: expire(%"PRIx64") < " - "now(%"PRIx64")\n", expire, now); - if ( !force ) - return -ETIME; - } + if ( (delta <= 0) && !force ) + return -ETIME; ch->next_event = expire; @@ -142,12 +137,10 @@ static void handle_hpet_broadcast(struct hpet_event_channel *ch) { cpumask_t mask; s_time_t now, next_event; - int cpu, current_cpu = smp_processor_id(); + int cpu; spin_lock(&ch->lock); - if ( cpu_isset(current_cpu, ch->cpumask) ) - printk(KERN_DEBUG "WARNING: current cpu%d in bc_mask\n", current_cpu); again: ch->next_event = STIME_MAX; next_event = STIME_MAX; @@ -162,8 +155,6 @@ again: else if ( per_cpu(timer_deadline, cpu) < next_event ) next_event = per_cpu(timer_deadline, cpu); } - if ( per_cpu(timer_deadline, current_cpu) <= now ) - cpu_set(current_cpu, mask); /* wakeup the cpus which have an expired event. */ evt_do_broadcast(mask);